In a conventional differential predictive image/video coding system, an encoder performs several intra-predictions and several inter-predictions and then encodes a residual block after settling on a particular prediction. For some cases, an encoder can code individual blocks using only the prediction blocks without residual data. In such cases, the residual of the prediction is considered “zero” and thus not coded. For example, the PSKIP coding mode and the BSKIP coding mode in the H.264/AVC coding standard are used for cases where no prediction residual exists for P-slice blocks and B-slice blocks, respectively.
Zeroing out the residual block is an efficient encoding strategy, since no residual bits are coded and thus fewer bits are used to code the block. Even in a Rate-Distortion Optimized (RDO) mode decision scheme, such coding often results in the smallest rate-distortion cost among all encoding modes. Therefore, zero-residual coding is commonly selected as the optimal encoding mode in terms of a rate-distortion cost.
In terms of the perceptual quality, the zero-residual coding strategy is not always optimal due to noticeable artifacts. More specifically, for a block that contains a few pixels that are quite different from the prediction pixels, an encoder can still code the prediction residual block as “zero” according to the rate-distortion cost. The zero-residual coding mode is selected as the “quite different” pixels contribute very little to the overall prediction distortion of the block. Consequently, the actual reconstructed pixels are the prediction pixels. Unfortunately, the reconstructed pixels are quite different from the original pixels for a small number of pixels in a large block (i.e., 16×16 pixels or larger). Thus, the zero-residual coding mode can produce quite noticeable artifacts in the reconstructed images. If the artifacts appear in a reference, slice such as I-slices, P-slices or reference B-slices in video coding, the artifacts can propagate to other pictures via the PSKIP mode or the BSKIP mode, resulting in so-called “sticky” or “trailing” artifacts.
Current methods to control zero-residual coding analyze statistics of the block, such as the high frequency components of the block and the motion and/or edge motion of the block. For example, if the average high frequency of a block is above a threshold, the zero-residual coding is disallowed. Such methods based on the average statistics of a block usually cannot remove the sticky artifacts effectively since the artifacts are due to the prediction and are not reflected in the statistics of the original block.
Other conventional approaches modify the rate-distortion cost for the zero-residual coding for making rate distortion optimization mode decision. Such methods (i) set an extra rate offset for the zero-residual coding mode, (ii) specially define the distortion for the zero-residual coding mode to reflect the local distortion better or (iii) set a special Lagrangian multiplier for the zero-residual coding mode. Such approaches are helpful to reduce the overall probability of choosing the zero-residual coding mode. However, reducing the probability of using the zero-residual coding also penalizes the blocks where the zero-residual coding mode does not generate the sticky artifacts. As such, the coding efficiency is reduced in conventional approaches.